/*
 * @Description:
 * @Author: zoeblow
 * @Email: wangfuyuan@nnuo.com
 * @Date: 2019-12-16 15:40:45
 * @LastEditors  : zoeblow
 * @LastEditTime : 2019-12-26 19:27:06
 * @FilePath: \monitor\modules\upLog.js
 */
const mongoose = require("../config/db");
const ResourceLoadData = require("../schema/resourceLoad.js");
// console.log(ResourceLoadData(), "ResourceLoadData");

const schema = mongoose.Schema(ResourceLoadData(), {
  collection: "resourceload"
});
var Thing = mongoose.model("resourceload", schema);
class ResourceLoadModel {
  /**
   * 创建ResourceLoad信息
   * @param data
   */
  static async createResourceLoad(data) {
    // console.log(data, "createResourceLoad");
    const resourceload = new Thing({
      ...data
    });
    return await resourceload.save();
  }
}
module.exports = ResourceLoadModel;
